<template>
  <el-row>
    <el-col :span="8">
      <el-button type="primary" @click="$emit('add')">新增</el-button>
      <el-button type="success">导出</el-button>
    </el-col>
    <el-col :span="8"></el-col>
    <el-col :span="8">
      <el-button type="danger">打印</el-button>
    </el-col>
  </el-row>
  <el-table :data="tableData" style="width: 100%" >
    <el-table-column prop="date" label="Date" width="180" />
    <el-table-column prop="name" label="Name" width="180" />
    <el-table-column prop="address" label="Address" />
  </el-table>
  <el-row>
    <el-col :span="12"></el-col>
    <el-col :span="12">
      <div class="example-pagination-block">
        <el-pagination layout="prev, pager, next" :total="count" />
      </div>
    </el-col>
  </el-row>

</template>

<script setup>
  defineProps(['tableData', 'count'])
  defineEmits(['add'])
</script>

<style scoped>
  .example-pagination-block + .example-pagination-block {
    margin-top: 10px;
  }
  .example-pagination-block .example-demonstration {
    margin-bottom: 16px;
  }
</style>